<html>
<head>
<script type="text/javascript" src="/hasthi/public/restcall.js"/>
<!--   <link rel="stylesheet" type="text/css" href="mystyle.css" /> -->
</head>
<body onload="init()">
	<h1>Management Dashboard</h1>
	<table><tr><td>
	<div>
	<h2>System State</h2>
	<table>
	<tr><td width="50%">
	<div id="div1">
		<table border="1">
		<tr><th>Type</th><th>Functional</th><th>Overloaded</th><th>Faulty</th></tr>
		<tr><td>Service</td><td id="Service_Functional">0</td><td id="Service_SaturatedState">0</td><td id="Service_Faulty">0</td></tr>
		<tr><td>Host</td><td id="Host_Functional">0</td><td id="Host_SaturatedState">0</td><td id="Host_Faulty">0</td></tr>
		<tr><td>TransientService</td><td id="TransientService_Functional">0</td><td id="TransientService_SaturatedState">0</td><td id="TransientService_Faulty">0</td></tr>
		<tr><td>ComputeNode</td><td id="ComputeNode_Functional">0</td><td id="ComputeNode_SaturatedState">0</td><td id="ComputeNode_Faulty">0</td></tr>
	</table>
	</div>
	</td>
	<td width="40%">
	<table border="1">
	<tr><th colspan="2">System Summary</th></tr>
	<tr><td>managerCount</td><td id="managerCount"></td></tr>
	<tr><td>resourceCount</td><td id="resourceCount"></td></tr>
	<tr><td>memoryUsage</td><td id="memoryUsage"></td></tr>
	</table>
	</td>
	<!--  
	<td width="30%">
	<table border="1">
	<tr><th colspan="2">Resource Data</th></tr>
	<tr><td>name</td><td>FactoryService</td></tr>
	</table>
	</td>
	-->
	</tr>
	</table>
	</div>
	<div>
	<h2>Workflow State</h2>
	<table><tr><td>
	<table border="1">
	
	<tr><th >Workflow Summery</th></tr>
		<tr><td>Workflows Running</td><td id="workflowsRunning"></td></tr>
		<tr><td>Workflows Finished</td><td id="workflowsFinished"></td></tr>
		<tr><td>Workflows Failed</td><td id="workflowsFailed"></td></tr>
		<tr><td>Workflows Paused</td><td id="workflowsPaused"></td></tr>
		<tr><td>Failure Count</td><td id="failureCount"></td></tr>
	</table>
	</td><td>
		<h3>Failure Data</h3>
		<table id="wf_faildata_table" border="=1">
			
		</table>
	</td></tr></table>
	</div>
	</td><td>
	<div>
		<h2>Resource Browser</h2>
		<table border="1" >
		<tr><th>Resource Name <input type="text" id="rb_resource_name"/> 
			Resource Category <select name="category" id ="rb_category">
			<option value="Service">Service</option>
			<option value="TransientService">TransientService</option>
			<option value="Host">Host</option>
			<option value="ComputeNode">ComputeNode</option>
			</select> <button onclick="updateResourcesList()">Update</button> </th></tr>
			<tr><td><table id="resourcePannel">
			
			</table></td></tr>
			<tr><td><button onclick="updateSystemState()">Load</button></td></td></tr>
	</table>
		
	</div>
	</td></tr></table>
	<!-- 
	<div>
	<table border="1">
	<tr><th>Shell</th></tr>
		<tr><td><textarea id="shell_out" rows="3" cols="100"></textarea></td></tr>
		<tr><td align="center"><button onclick="processShellSubmit()">Execute</button></td></tr>
		<tr><td align="center">Output</td></tr>
		<tr><td><textarea id="shell_out" rows="3" cols="100"></textarea></td></tr>
		<tr><td align="center"><button onclick="updateSystemState()">Load</button></td></tr>
	</table>
	</div>
	 -->
	<!-- 
	<form method="get" onsubmit="processShellSubmit()"> 
	<input type="button" value="Submit" name="addOpSubmit" onclick="processShellSubmit()" /></tr>
	-->
	<!-- </form> -->
</body>
</html>